package io.rehuo.modules.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.rehuo.modules.app.dao.RepaymentLogDao;
import io.rehuo.modules.app.entity.RepaymentLogEntity;
import io.rehuo.modules.app.service.RepaymentLogService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author shiguang
 * @date 2022年09月12日 20:01
 */
@Service("repaymentLogService")
public class RepaymentLogServiceImpl extends ServiceImpl<RepaymentLogDao, RepaymentLogEntity> implements RepaymentLogService {

    @Override
    public List<RepaymentLogEntity> selectListByUserId(Long userId) {
        return baseMapper.selectList(new QueryWrapper<RepaymentLogEntity>().eq("user_id",userId).eq("status","2").orderByDesc("create_time"));
    }
}
